﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wedo.Recognition.Domain.Models;
using Wedo.Recognition.Domain.Mapping;
using System.Data.Entity.ModelConfiguration;

namespace Wedo.Recognition.Domain.Mapping
{
    public class CheckRecord_Mapping : EntityConfiguration<CheckRecord>
    {
        public CheckRecord_Mapping()
        {
            ToTable("CheckRecord");

            HasKey(s => s.Id).Property(s => s.Id);
            Property(s => s.Assiginment).HasColumnType("varchar").HasMaxLength(50).IsRequired();
            Property(s => s.ApplyMan).HasColumnType("varchar").HasMaxLength(50).IsRequired();
            Property(s => s.ApplyTime).HasColumnType("datetime2").IsRequired();
 
            HasRequired(b => b.BankData).WithMany(m => m.CheckRecord)
                .HasForeignKey(b => b.BankDataId);

        }
    }
}
